< previous page page_140 next page >

Page 140
unit or class testing in which each private or friend method is sent expected arguments (given certain assumptions about the state of the system) to assess the outcome. The outcome can include return values and objects, as well as any anomalies associated with the method's operation. Testing the externally observable behavior of a component requires much the same pattern of effort, except there is much more at stake. With more advanced component systems, testing a facade for the component can also be involved.
New Term: A friend method is accessible to other objects within the same component or application.
Drafting a Master Test Plan
In its simplest form, a master test plan summarizes the goal of the testing effort, the resources required to test the software, and the test cases to be examined. For simplicity, assume that
The goal of the testing effort is to ensure that making a deposit works to the satisfaction of the Second Bank of Carrollton.
Only one tester is required.
There's only one test case.
The sole test case is discussed in the next section.
Drafting Test Cases
A test case is very similar to a use case in that it represents the value provided to the user by an application. When you use object-oriented methodologies, you base the content of the test case on a well-defined use case. Because each use case has one or more actors who perform it, a test case also has one or more actors on behalf of whom the tester is testing the software.
The use case for your component system is as follows:
Use Case: Deposit Funds into Basic Personal Checking Account
Description: A Bank Teller requests a given customer's basic personal checking account from the Samsona Bank Teller System by entering the customer's appropriate account number. When the account is presented to the Bank Teller, the Bank Teller enters the deposit amount. Finally, the Bank Teller requests that the Samsona Bank Teller System store the deposit transaction persistently.

Figure 6.9 shows the use-case diagram for this use case. Essentially, the test case has exactly the same verbiage and structure.

 
< previous page page_140 next page >

If you like this book, buy it!